From 2d9c9413ab7c7a1184a66eec44f48a3044a36242 Mon Sep 17 00:00:00 2001 From: Hollis Blanchard Date: Mon, 16 Jul 2007 14:20:16 -0500 Subject: [PATCH] [POWERPC][XEN] Use top-level CFLAGS. - Append to CFLAGS instead of replacing it. - Fix newly-exposed mixed statement/declaration warnings. --- xen/arch/powerpc/Rules.mk | 4 ++-- xen/arch/powerpc/mpic_init.c | 4 +++- xen/arch/powerpc/of-devtree.c | 2 +- xen/arch/powerpc/of-devwalk.c | 8 +++----- xen/arch/powerpc/of_handler/ofh.c | 24 ++++-------------------- xen/arch/powerpc/ofd_fixup.c | 9 ++++++--- xen/include/asm-powerpc/xenoprof.h | 2 +- 7 files changed, 20 insertions(+), 33 deletions(-) diff --git a/xen/arch/powerpc/Rules.mk b/xen/arch/powerpc/Rules.mk index fd26632ae6..49e0e5477a 100644 --- a/xen/arch/powerpc/Rules.mk +++ b/xen/arch/powerpc/Rules.mk @@ -9,8 +9,8 @@ C_WARNINGS := -Wredundant-decls # _no_ common code can have packed data structures or we are in touble. C_WARNINGS += -Wpacked -CFLAGS := -m64 -ffreestanding -fno-builtin -fno-common -CFLAGS += -iwithprefix include -Wall -Werror -pipe +CFLAGS += -m64 -ffreestanding -fno-builtin -fno-common +CFLAGS += -iwithprefix include -Werror -pipe CFLAGS += -I$(BASEDIR)/include CFLAGS += -I$(BASEDIR)/include/asm-powerpc/mach-generic CFLAGS += -I$(BASEDIR)/include/asm-powerpc/mach-default diff --git a/xen/arch/powerpc/mpic_init.c b/xen/arch/powerpc/mpic_init.c index 22952f54fe..f4e4074ae1 100644 --- a/xen/arch/powerpc/mpic_init.c +++ b/xen/arch/powerpc/mpic_init.c @@ -153,13 +153,15 @@ static unsigned long find_ranges_addr_from_node(void *oft_p, ofdn_t c) u32 addr_c = 2; u32 ranges[64]; int p_len; + int i; parent = ofd_node_parent(oft_p, c); parent = ofd_node_parent(oft_p, parent); p_len = ofd_getprop(oft_p, parent, "ranges", &ranges, sizeof(ranges)); DBG("%s: ranges\n", __func__); - int i; for (i=0; i 0 ); +#else + (void)compat; #endif - u32 did = d->domain_id; + did = d->domain_id; r = ofd_prop_add(m, n, "ibm,partition-no", &did, sizeof(did)); ASSERT( r > 0 ); - const char d0[] = "dom0"; r = ofd_prop_add(m, n, "ibm,partition-name", d0, sizeof (d0)); ASSERT( r > 0 ); diff --git a/xen/include/asm-powerpc/xenoprof.h b/xen/include/asm-powerpc/xenoprof.h index 3d17cc5193..195796e5d1 100644 --- a/xen/include/asm-powerpc/xenoprof.h +++ b/xen/include/asm-powerpc/xenoprof.h @@ -83,7 +83,7 @@ static inline void ctr_write(unsigned int i, unsigned int val) } } -static inline void print_perf_status() +static inline void print_perf_status(void) { ulong mmcr0 = mfmmcr0(); ulong mmcr1 = mfmmcr1(); -- 2.30.2